<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<jsp:include page="../header.jsp" />
<div id="content">
	<div id="topstory" class="box">
		<h1>
			<fmt:message key="authors.title.new" />
			<span id="datepicker" ></span>
		</h1>
	</div>
	<div class="padding">
		<c:choose>
			<c:when test="${ author != null}">
				<form:form action="submit.do" commandName="author" method="POST">
					<table border="0" cellspacing="5" cellpadding="0" width="100%" class="formTable tplBorder">
						<tr>
							<td width="15%"></td>
							<td width="35%"></td>
							<td width="15%"></td>
							<td width="35%"></td>
						</tr>
						<tr>
							<td class="label"><fmt:message key="user.name" /></td>
							<td><form:input path="jmeno" /> <form:errors path="jmeno" cssStyle="color: red;"/></td>
							<td colspan="2" />
						</tr>
						<tr>
							<td class="label"><fmt:message key="user.surname" /></td>
							<td><form:input path="prijmeni" /> <form:errors path="prijmeni" cssStyle="color: red;"/></td>
							<td colspan="2" />
						</tr>
						<tr>
							<td colspan="2"><input type="submit" /></td>
							<td colspan="2"><input type="button" onclick="javascript:window.location('authors/showList')" /></td>
						</tr>
					</table>
				</form:form>
			</c:when>
			<c:otherwise>
				<h3>${error }</h3>
			</c:otherwise>
		</c:choose>
	</div>
	<!-- /padding -->
</div>
<!-- /content -->
<jsp:include page="side-menu.jsp" />
<jsp:include page="../foother.jsp" />
